package com.bdcom.autotest.interaction.step;

import com.bdcom.autotest.ui.step.StepItem;

public class StepBean {
	
	public static final String type_step = "step";
	public static final String type_tip = "tip";
	
	public StepBean() {
		
	}
	
	
	public StepBean(String name, String type, String desc) {
		this.name = name;
		this.type = type;
		this.desc = desc;
	}
	

	public StepBean(String name, String type, String desc , String tip, String handleclass) {
		this.name = name;
		this.type = type;
		this.desc = desc;
		
		this.tip = tip;
		this.handleclass = handleclass;
	}



	private String name ;
	private String type = "step" ; //step / tip
	
	private String tip   ; 
	private String handleclass   ; 
	private String desc   ;
	private String btn   ;
	private boolean repeat =false;
	
	private int runTimes=0;
	
	private FlowBean parent;
	
	StepItem stepItem;

	private int hh = 25;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}
	public String getHandleclass() {
		return handleclass;
	}
	public void setHandleclass(String handleclass) {
		this.handleclass = handleclass;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getHh() {
		return hh;
	}

	public void setHh(int hh) {
		this.hh = hh;
	}

	public String getBtn() {
		return btn;
	}

	public void setBtn(String btn) {
		this.btn = btn;
	}

	public boolean getRepeat() {
		return repeat;
	}
	public void setRepeat(boolean repeat) {
		this.repeat = repeat;
	}
	public void setItem(StepItem stepItem) {
		this.stepItem=stepItem;
	} 
	public FlowBean getParent() {
		return parent;
	}
	public void setParent(FlowBean parent) {
		this.parent = parent;
	}

	public void notifyRes(  boolean res ) {
		stepItem.updateRes(res);
	}


	public void startRun() {
		stepItem.addLoading();
	}

	public void enableBtn() {
		stepItem.setBtnEnable();
	}


	public void hidePic() {
		stepItem.hidePic();
	}
	
	public void showPic() {
		stepItem.showPic();
	}


	public StepItem getStepItem() {
		return stepItem;
	}

	public void setStepItem(StepItem stepItem) {
		this.stepItem = stepItem;
	}


	public int getRunTimes() {
		return runTimes;
	}
	
	public void setRunTimes(int runTimes) {
		this.runTimes = runTimes;
	}
	
	public int addRunTime() {
		this.runTimes++;
		return runTimes;
	}
	
	
	
	
	
}
